from django.shortcuts import render

# Create your views here.
from rest_framework.viewsets import ViewSet
from rest_framework.decorators import action
from utils.common_response import APIResponse
from patient.serializer import QueryUserSerializer

class QueryUserView(ViewSet):
    # http://127.0.0.1:8000/api/v1/api/v1/patient/query_user/query_user/
    @action(methods=['POST', ], detail=False)
    def query_user(self, request):
        ser = QueryUserSerializer(data=request.data)
        ser.is_valid(raise_exception=True)
        return APIResponse(msg='用户查证通过')